pypy: make CFFI builds find libsqlite3#431707
Conversation
This isn't an option - we only have our CPython 2.7 package around for resholve at this point and it is due for removal as soon as that is sorted one way or another. PyPy considers their 2.7 implementation a going concern, right? I assume they means they're taking maintenance responsibility for the standard library too? Has this been reported upstream for them to backport the fix? |
Yes, they say: "PyPy will always support 2.7 since RPython is written for it." No, I have not reported this upstream. I will look into that. Probably, I should also look into the other CPython 2.7 patches we have and check which of those apply to the standard library (and are thus potentially relevant for PyPy). |
|
test_misencodedFileUTF16 fails with PyPy3 as it outputs a different error message than CPython.
|
I have addressed the
|
|
Strictly speaking the expectation of DT_SONAME in general is also an ongoing concern for CPython3 |
|
So we can merge this as is now? |
Yes. I have a follow-up to make more progress on |
This fixes the PyPy build, which has been broken since June 2025. The issue was tracked down in #419942:
Basically, SQLite stopped setting
SONAMEforlibsqlite3.sosince their switch toautosetup(in v3.50).This breaks
ctypes.util.find_library()for CPython 2.7 (and PyPy 2.7) only.However, both PyPy 2.7 and PyPy 3.x are built using PyPy 2.7, and since this is a build-time issue, it also affects PyPy 3.
This is one approach to fix this. Others would include:
pypy27_prebuiltandpypy27, similar to what is done for CPython 2 (https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/cpython/2.7/find_library-gcc10.patch),abandoning PyPy 2.7 fully and buildling PyPy 3.X using CPython 2.7 (but this apparently can take 2-3 times longer)(not an option as CPython 2.7 is unsupported, insecure, and due for removal in Nixpkgs soon), orSONAMEagain forlibsqlite3, using--soname=legacyconfigure flag for SQLite (as suggested in Build failure: pypy #419942).We could also disable the
sqlite3module, but that seems like the worst idea.I noticed that there are also some other patches to the CPython 2.7 standard library which should probably also be applied to PyPy 2.7 (since PyPy's standard library is mostly copied verbatim from CPython). In the end, it boils down to whether PyPy 2.7 should be supported
I have tested this locally using a follow-up to #430846, which uses the (now working) PyPy 3.11 in the
icestormpackage.Resolves #419942.
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.